using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using DualControl.Posts.Dtos;
using DualControl.Posts;

namespace DualControl.Posts
{
    /// <summary>
    /// Post应用层服务的接口方法
    /// </summary>
    public interface IPostAppService : IApplicationService
    {
        /// <summary>
        /// 获取Post的分页列表信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<PostListDto>> GetPagedPosts(GetPostsInput input);

        Task<List<PostListDto>> GetAllPosts();

        List<Post> GetAllPostsByDapper();
        int GetCount();

        /// <summary>
        /// 通过指定id获取PostListDto信息
        /// </summary>
        Task<PostListDto> GetPostByIdAsync(EntityDto<int> input);


        /// <summary>
        /// 导出Post为excel表
        /// </summary>
        /// <returns></returns>
		//Task<FileDto> GetPostsToExcel();

        /// <summary>
        /// MPA版本才会用到的方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetPostForEditOutput> GetPostForEdit(NullableIdDto<int> input);

        //todo:缺少Dto的生成GetPostForEditOutput


        /// <summary>
        /// 添加或者修改Post的公共方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateOrUpdatePost(CreateOrUpdatePostInput input);


        /// <summary>
        /// 删除Post信息的方法
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeletePost(EntityDto<int> input);


        /// <summary>
        /// 批量删除Post
        /// </summary>
        Task BatchDeletePostsAsync(List<int> input);


		//// custom codes 
		
        //// custom codes end
    }
}
